/**
 * Created by arron_Li on 17/12/8. // 登录接口
 */
import ajax from '@/utils/public'

export const login = (params) => {
  return ajax.fetchPost('/backLogin', params)
}

export const logout = (params) => {
  return ajax.fetchPost('/logout', params)
}

export const getUserInfo = (params) => {
  return ajax.fetchGet('/login/getUserInfo', params)
}

export const getCategory = (params) => {
  return ajax.fetchGet('/getCategory', params)
}

export const addCategory = (params) => {
  return ajax.fetchPost('/editCategory', params)
}

export const delCategory = (params) => {
  return ajax.fetchPost('/delCategory', params)
}

export const isLogin = () => {
  return ajax.fetchPost('/checkLogin')
}
